<!-- <style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style> -->
<template src="./index.html"></template>
<script>
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
    components: {
        SelectImageRadio: async () =>
            Vue.extend(
                await Vue.prototype.$vFN.Components.Base.SelectImageRadio()
            ),
    },
    data() {
        return {
            appWindow: window,
            form: {
                parentId: 0,
                // 分组名称
                name: "",
                icon: "",
                // 是否显示
                isHide: 0,
                // 是否热门
                isStars: 0,
            },

            // 页面接口地址
            apiUrl: {
                create: "store/groups/add",
                update: "store/groups/edit",
                detail: "store/groups/detail",
            },
        };
    },
    methods: {
        // 初始化
        async init() {
            // 初始化数据
            await this.mixinEdit_editBoxInit({
                model: "form",
                id: this.id,
            });
            // 如存在父id  则在此父下创建菜单
            if (this.parentId) {
                this.form.parentId = this.parentId;
            }
        },
    },
    mounted() {
        this.init();
    },
    activated() {},
};
</script>